﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Architecture.Repository.Migrations
{
    public partial class m3 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "LeaveTime",
                table: "RequestForLeaves",
                type: "nvarchar(max)",
                nullable: false,
                oldClrType: typeof(DateTime),
                oldType: "datetime2");

            migrationBuilder.AddColumn<DateTime>(
                name: "RegistrationTime",
                table: "RequestForLeaves",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<decimal>(
                name: "TotalWorkTime",
                table: "RequestForLeaves",
                type: "decimal(18,2)",
                nullable: false,
                defaultValue: 0m);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "RegistrationTime",
                table: "RequestForLeaves");

            migrationBuilder.DropColumn(
                name: "TotalWorkTime",
                table: "RequestForLeaves");

            migrationBuilder.AlterColumn<DateTime>(
                name: "LeaveTime",
                table: "RequestForLeaves",
                type: "datetime2",
                nullable: false,
                oldClrType: typeof(string),
                oldType: "nvarchar(max)");
        }
    }
}
